import { createApp } from 'vue'
import pinia from '@/stores'

import App from './App.vue'
import router from './router'

// 引入初始化样式
import "@/styles/common.scss"
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入插件
import { lazyPlugin } from '@/directives'
// 引入全局组件
import { componentPlugin } from '@/components'

const app = createApp(App)

// 注册插件
app.use(lazyPlugin)
app.use(componentPlugin)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(pinia)
app.use(router)

app.mount('#app')

